package edu.zut.pojo;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * @ConfigurationProperties :标明当前是一个属性配置类
 * @Component ：标明当前是一个组件，将当前类交给Spring容器自动管理
 */
@ConfigurationProperties(prefix = "img")
@Component
public class ImgProperties {

    private String port;

    private String ip;

    private String contextPath;

    private List<String> dirs;

    private Map<String,String> map;

    public Map<String, String> getMap() {
        return map;
    }

    public void setMap(Map<String, String> map) {
        this.map = map;
    }

    public List<String> getDirs() {
        return dirs;
    }

    public void setDirs(List<String> dirs) {
        this.dirs = dirs;
    }

    public String getPort() {
        return port;
    }

    public void setPort(String port) {
        this.port = port;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getContextPath() {
        return contextPath;
    }

    public void setContextPath(String contextPath) {
        this.contextPath = contextPath;
    }

    @Override
    public String toString() {
        return "ImgProperties{" +
                "port='" + port + '\'' +
                ", ip='" + ip + '\'' +
                ", contextPath='" + contextPath + '\'' +
                ", dirs=" + dirs +
                ", map=" + map +
                '}';
    }
}
